<?php
namespace Home\Controller;

class TrainingController extends HomeController {

    public function index(){
    	$this->display();
    }


    public function detail(){
    	$id = I('get.id');
    	if ($id=='') {
    		$this->error(L('_parm_error'));
    	}
    	$map['id'] = $id;
    	$list = M("TrainCate")->where($map)->find();
    	if (!$list) {
    		$this->error(L('_not_exist'));
    	}else{
    		$train = M('TrainCate')->select();
    		$this->assign('train',$train);
    		$this->assign('list',$list);
    		$this->display();
    	}    	
    }
   
}